package cn.hesion.springcloud.service;
/**
 * ClassName: PaymentService <br/>
 * Description: <br/>
 * date: 2020/8/30 13:44<br/>
 *
 * @author Hesion<br />
 * @version
 * @since JDK 1.8
 */

import org.springframework.stereotype.Service;

/**
 * @program: springcloud
 * @description:
 * @author: hesion
 * @create: 2020-08-30 13:44
 **/
@Service
public class PaymentService {
    public String payment_ok(Integer id){
        return "线程池: "+Thread.currentThread().getName()+" payment_ok,id="+id+" 😀";
    }

    public String paymentinfo_timeout(Integer id){
        int timeout = id;
        try {
            Thread.sleep(timeout);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "线程池: "+Thread.currentThread().getName()+" payment_paymentinfo_timeout,id="+id+" 😀"+"耗时(ms): "+timeout ;
    }
}
